home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Dots & Pixels
/
headers
/
C_randomizer.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-29
|
603b
|
31 lines
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
extern int seed_24_index;
extern int seed_55_index;
unsigned long randomizer_step( void);
/*
// randomizer_fill is supposed to be faster than doing
//
// for( int i = 0; i < numSteps; i++)
// {
// *start++ = randomizer_step();
// }
*/
void randomizer_fill( unsigned long *start, long numSteps);
double randomizer_a_double( void);
void randomizer_reseed( unsigned long seed);
#ifdef __cplusplus
}
#endif
#define randomizer_a_coin() (randomizer_step() & 1)
#define randomizer_an_int(num_values) (randomizer_step() % num_values)